True if there is an instance of obj (solid or not) at the single point (x, y). Name more objects after the first and it is true if there is an instance of any of them there.
point_meeting(x, y, obj, ...more) -> bool| Name | Type |
|---|---|
x | real |
y | real |
obj | object |
...more | object (any number of them, none included) |
bool
True if there is an instance of obj - solid or not - at the single point (x, y). The raw-point counterpart to pos_meeting: a precise hit test against one exact spot, not tied to this instance's own box size the way pos_meeting is.
The point (x, y) is a place in the room, counted from the room's top-left corner.
If obj is a parent, its children count as obj too. With obj_enemy as the parent of obj_slime, a slime at the point counts like an obj_enemy. You can name more than one object: point_meeting(x, y, obj_coin, obj_gem) is true when there is an instance of any of them at the point. An object whose Code-tab box Never moves is ticked is answered from a look-up grid instead - same answer, much less work when there are many copies (Never moves).
An instance destroyed earlier in the same frame still counts for this check until the end of the frame, because instance_destroy only ends it then. The one exception is a Collision event, which skips it at once.
An instance with no sprite and no mask size has a box with no size, and a box with no size contains no point, so this never finds one. (Overlap and collision has the whole rule.)
var probe_x = x + 8;
var probe_y = y;
var touching_pickup = point_meeting(probe_x, probe_y, obj_doc_pickup);Records whether the exact point 8 pixels ahead of the walker touches any obj_doc_pickup instance, solid or not - a single point, not the walker's whole box the way pos_meeting would test it.
Any number of objects may be named; each one is checked together with its children, and an object named twice is checked once.